import React, { useEffect } from "react";
import styles from "./index.module.less";
import Item from "./item";
import { connect } from "react-redux";
import { getDevItemListAction } from "@redux/actions02";

const UnderDevelopment = (props) => {
    const { getDevItemListAction, list } = props;

    useEffect(() => {
        getDevItemListAction();
    }, [getDevItemListAction]);

    return (
        <div className={styles.under_development}>
            {list && list.map((item) => <Item key={item.key} item={item} />)}
        </div>
    );
};

export default connect(
    (state) => ({
        list: state.devItemReducer,
    }),
    { getDevItemListAction }
)(UnderDevelopment);
